#BEGIN
#name=smb
#nead=
#END

#!/bin/bash


apt-get install samba -y || exit -1

#file="/mnt/raid/to_snap/BACKUP/ETC/samba/smb.conf"
file="./smb.conf"
dest="/etc/samba/smb.conf"

/etc/init.d/samba stop

if [[ -f "$file" ]] ; then
	cp "$file" "$dest"
fi


echo -e "free\nfree" | smbpasswd -a -s gef || exit -1

/etc/init.d/samba start 

